package com.martin.study.others;

import org.springframework.util.StringUtils;

public class BaseEntity {

	private String name;

	public BaseEntity() {
	}

	public BaseEntity(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static void main(String[] args) {
		BaseEntity baseEntity = new BaseEntity();
		System.out.println(baseEntity.getName());
		if(baseEntity.getName()==null){
			baseEntity = new BaseEntity(){
				@Override
				public String getName() {
					return "martin";
				}
			};
			System.out.println(baseEntity.getName());
		}
	}
}
